﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<KLS.PPDS.Web.Models.ArticleContentViewModel>" %>
<%@ Import Namespace="KLS.PPDS.Resources" %>
<%@ Import Namespace="KLS.PPDS.Utility.Html" %>
<%@ Import Namespace="KLS.PPDS.Utility" %>
<tr>
 <%--   <td>
        <label for="txt_<%:Model.Id%>">
            <%:CommonString.UploadText %></label>
    </td>--%>

    <%var txt = String.IsNullOrEmpty(Model.TextFileError).Equals(true) ? string.Empty : "error";
            var txtFile = Model.IsTextDisable.Equals(false) && Model.TextFiles.Count == 0 ? "" : "disabled";
            var pubId = Model.PublicationId;
            var artId = Model.ArticleId;
            var comId = Model.CompanyId;
            var contentId = Model.Id;          
    %>

    <td>
        <div class="text-upload-lable">
            <label for="txt_<%:Model.Id%>"><%:CommonString.UploadText %></label>
        </div>     
        <div class = "text-upload-wrapper">
            <div class="text-button-text-wrapper">                                               
                    <%:CommonString.UploadText %>             
            </div>   
            <div class="text-button-wrapper">  
                <input type="file" name="txt_<%:Model.Id%>" class="text-upload <%:txt %> clear-error" id="txt_<%:Model.Id%>" comId="<%:comId%>" pubId="<%:pubId%>" artId="<%:artId%>" contentId="<%:contentId%>" 
                    <%:txtFile %> />
            </div>
        </div>
        <%if (!String.IsNullOrEmpty(txt))
            {%>
        <label for="txt_<%:Model.Id%>" generated="true" class="error">
            <%:Model.TextFileError%>
        </label>
        <%
            } %>
    </td>
</tr>
